Page({

  /**
   * 页面的初始数据
   */
  data: {
    title: '加载中...', // 状态
    list: [],
    type: '', // 数据类型
    loading: true // 显示等待框
  },
  onLoad:function() {
    var that = this
    wx.request({
      url: 'http://172.16.10.130:7558/api/articles',
      success (res) {
        console.log(res)
        that.setData({list:res.data.data.list})
        console.log(this.list)
      }
    })
  },
  rowTapped: function (event) {
    var id = event.currentTarget.dataset.id
    console.log(id)
    var to = {
      url: `../articleDetail/index?id=${id}`
    }
    wx.navigateTo(to)
  }
})